
from django.shortcuts import render
from stuInfo.models import Counselor
from stuInfo.utils.pagination import Pagination


def counselor_index(request):
   

    name = request.GET.get("name",'')
    queryset = Counselor.objects.filter(name__contains = name)
    page_object = Pagination(request,queryset)
    page_queryset = page_object.page_queryset
    page_str = page_object.html()[0]
    page_info = page_object.html()[1]
    page_id_start = page_object.html()[2]


    return render(request,"counselor.html",{
        "counselor_infos":page_queryset,
        "page_str" :page_str,
        "page_info" :page_info,
        "page_id_start":page_id_start,

    })